package com.gzh.demo.service;

import javax.annotation.Resource;
import javax.transaction.Transactional;

import org.springframework.stereotype.Service;

import com.student.demo.entity.Student;
import com.student.demo.repository.StudentRepository;

@Service
public class StudentService {
	
	@Resource
	private StudentRepository studentRepository;
	
	@Transactional
	public Student addstu(Student student) {
		return studentRepository.save(student);
	}
}
